package com.trt.eatmeat.util;

/**
 * @Author yufeng_ma@trtjk.com
 * @Description //TODO
 * @Date 2022/1/21 16:08
 **/
public enum MsgType {
    join("join"),
    quit("quit"),
    http("http"),
    no("no");

    private String name;

    MsgType(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }



    public static MsgType getType(String name) {
        for (MsgType c : MsgType.values()) {
            if (c.getName().equals(name)) {
                return c;
            }
        }
        return MsgType.no;
    }
}
